﻿@{        
	var accessToken = Foursquare.GetAccessToken();

    // In a production scenario you should store the user's access token in a database
    Session["accessToken"] = accessToken;
    
    var returnUrl = Request["returnUrl"];
    if (returnUrl.IsEmpty()) {
        returnUrl = "~/";
    }
    
    Context.RedirectLocal(returnUrl);
}